import {
    createBrowserRouter,
    Navigate,
    // Route,
    // Routes
} from "react-router-dom";
import Layout from '../views/layout/index';
import Index from '../views/home/index'
import Test from '../views/home/test';
import About from '../views/home/about';
import Home from '../views/home/home';
// export default function Router() {
//     return (
//         <Routes>
//             <Route path="/" element={<Layout />}>
//                 <Route index element={<Navigate to="/index" replace />} />
//                 <Route path="index" element={<Index />} />
//                 <Route path="test" element={<Test />} />
//                 <Route path="about" element={<About />} />
//             </Route>

//         </Routes>
//     )
// }
export const router = createBrowserRouter([
    {
        path: "/",
        element: <Layout />,
        children: [
            {
                index: true,
                element: <Navigate to="/index" replace />,
            },
            {
                path: '/index',
                element: <Index />,
            },
            {
                path: '/test',
                element: <Test />
            },
            {
                path: '/about',
                element: <About />
            }
        ]
    },
    {
        path: '/home',
        element: <Home />
    }

])
